<?php
use yii\helpers\Html;
use yii\bootstrap\ActiveForm;
use yii\helpers\Url;
/* @var $this yii\web\View */
/* @var $form yii\bootstrap\ActiveForm */
/* @var $model \common\models\LoginForm */

$this->title = Yii::t('app', '数据列表');
?>
<style>
table,tr>th{
	width:800px;
	text-align: center;
}

table tr>th{
	padding:5px;
}
table tr>td{
	padding:2px;
}
caption{
	text-align: center;
	color: red;
	font-size:22px;
	padding:10px 0;
}
.bt{
	padding-top:10px;
	width:800px;
	margin:0 auto;
	text-align: right;
}
</style>

<!-- 数据展示表单 -->
<table  border='1px' align='center'>
	<caption>数据列表</caption>
	<tr>
		<th>编号</th>
		<th>图片名称</th>
		<th>状态</th>
		<th>标签</th>
		<th>操作</th>
	</tr>
	<?php foreach ($result as $key):?> 
	<tr>
		<td><?php echo $key['id']?></td>
		<td><?php echo $key['imgurl']?></td>
		<td><?php echo $key['status']?></td>
		<td><?php echo $key['flag']?></td>
		<td>
			<a href="<?php echo Url::to(['sqlcombat/view', 'id' => $key['id']]) ?>">查看</a>
			<a href="<?php echo Url::to(['sqlcombat/update', 'id' => $key['id']]) ?>">更新</a>
			<a href="<?php echo Url::to(['sqlcombat/del', 'id' => $key['id']]) ?>">删除</a>
		</td>
	</tr>		
		 <?php endforeach; ?>
</table>
<div class='button bt'>
	 <a class='btn btn-success' href="<?php echo Url::to(['sqlcombat/create']) ?>">新增一条数据</a>
</div>
